<template>
  <div>
    <div class="activity_detail_information">
      <span v-if="strExists(createTime)">创建时间：{{ createTime }}</span>
      <span v-if="strExists(startTime)">预计开始时间：{{ startTime }}</span>
      <span v-if="strExists(endTime)">预计结束时间：{{ endTime }}</span>
    </div>
    <el-divider/>

    <div>
      <p v-html="content"></p>
    </div>

  </div>
</template>

<script>
export default {
  props: {
    detail: Object
  },
  data() {
    return {
      startTime: this.detail.startTime,
      endTime: this.detail.endTime,
      createTime: this.detail.createTime,
      content: this.detail.content
    }
  },
  created() {
    // console.log("ddd", this.detail)
    // console.log("iii", this.createTime)
    // console.log("iii", this.endTime)
    // console.log("iii", this.startTime)
  },
  methods: {
    strExists(str) {
      return (typeof str !== 'undefined' && str !== null && str !== '');
    },
  }
}
</script>

<style scoped lang="less">
.activity_detail_information {
  display: flex;
  justify-content: space-between;

  span {
    display: block;
    font-weight: lighter;
  }
}

</style>
